package com.cn.xact.ty_treasured_book.activity;

import com.cn.xact.ty_treasured_book.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

public class MsgDetailsActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.msg_detail);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.common_customer_title);

        ImageView tmp = (ImageView)findViewById(R.id.common_title_indicator);
        tmp.setImageResource(R.drawable.main_msg);
        TextView title1 = (TextView)findViewById(R.id.common_title_first_section);
        title1.setText(R.string.main_msg);
        TextView separator1 = (TextView)findViewById(R.id.common_title_first_separator);
        separator1.setVisibility(View.VISIBLE);
        TextView title2 = (TextView)findViewById(R.id.common_title_second_section);
        title2.setText(R.string.main_msg_info);
        title2.setVisibility(View.VISIBLE);

        TextView msgBody = (TextView)findViewById(R.id.msg_detail);
        msgBody.setText(this.getIntent().getExtras().getString("msg"));

        title1.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                MsgDetailsActivity.this.finish();
            }

        });
    }
}